package cn.iocoder.yudao.module.pay.config.wx;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.io.Serializable;

@Data
@Component
@ConfigurationProperties(prefix = "wx")
public class WxProperties implements Serializable {

    private Mp mp;
    private MiniApp miniapp;

    /**
     * 微信公众号
     */
    @Data
    public static class Mp {
        private String appId;
        private String secret;
        private ConfigStorage configStorage;

        @Data
        public static class ConfigStorage {
            private String type;
            private String keyPrefix;
            private String httpClientType;
        }
    }

    /**
     * 微信小程序
     */
    @Data
    public static class MiniApp {
        private String appid;
        private String secret;
        @Data
        public static class ConfigStorage {
            private String type;
            private String keyPrefix;
            private String httpClientType;
        }
    }
}
